package main
import "fmt"
func A(){
	fmt.Println("aaaa")
}
func C(){
	fmt.Println("ccc")
}
func B(){

	defer func(){
		err:=recover()
		if err!=nil{
			fmt.Println("对不起,报错了....")
		}
	}()
	panic("hello world")
}
func D(a int,b int) int{
	defer func(){
		err:=recover()
		if err!=nil{
			fmt.Println("无法除以0")
		}
	}()
	return a/b
}
func main(){
	A()
	B()
	fmt.Println("over")
	C()
	result:=D(28,0)
	fmt.Println(result)
}